package com.gimi.cloud.jimi.merchantZone.consumer.feign;

import com.gimi.cloud.jimi.common.utils.reqhead.Response;
import com.gimi.cloud.jimi.dto.base.BaseDTO;
import com.gimi.cloud.jimi.dto.prod.ProdCategoryDTO;
import com.gimi.cloud.jimi.dto.product.ImageUploadDTO;
import com.gimi.cloud.jimi.dto.product.ProductStatusDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.gimi.cloud.jimi.dto.product.ProductDto;
import com.gimi.cloud.jimi.dto.params.GetProductParams;

import feign.Headers;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "jimi-merchantZone-service")
public interface ProductFeignService {

	@Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/addProduct", method = RequestMethod.POST)
    Response addProduct(@RequestBody ProductDto pdd);
	
	@Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/getProduct", method = RequestMethod.POST)
    Response getProduct(@RequestBody GetProductParams params);
	
	@Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/updateProduct", method = RequestMethod.POST)
    Response updateProduct(@RequestBody ProductDto pdd);
	
	@Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/getStoreCats", method = RequestMethod.POST)
    Response getStoreCats(@RequestBody ProductDto params);
	/**
	 * 商户中心发布商品
	 * @param pdd 封装商品数据
	 */
	@Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/releaseProduct", method = RequestMethod.POST)
    Response releaseProduct(@RequestBody ProdCategoryDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/list", method = RequestMethod.POST)
    Response getProductList(@RequestBody ProductDto params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/delete", method = RequestMethod.POST)
    Response deleteProduct(@RequestBody ProductStatusDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/upShelf", method = RequestMethod.POST)
    Response upShelfProduct(@RequestBody ProductStatusDTO params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/product/offShelf", method = RequestMethod.POST)
    Response offShelfProduct(@RequestBody ProductStatusDTO params);

    @Headers({"Content-Type: mutipart/form-data","Accept: application/json"})
    @RequestMapping(value = "/product/fileUpload", method = RequestMethod.POST)
    Response fileUpload(MultipartFile file);
	
}
